package cn.school.test;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.InGradeDao;
import cn.school.eneity.Grade;
import cn.school.eneity.Student;
import cn.school.util.MyBatisUtil;

public class GradeTest {
	public static void main(String[] args) {
		SqlSession session = MyBatisUtil.getSession();
		InGradeDao mapper = session.getMapper(InGradeDao.class);
		Grade g = mapper.find(14L);
		System.out.println("年级信息信是" + g);
		System.out.println("这个学生息是");
		for (Student s : g.getStudent()) {
			System.out.println(s);
		}
		System.out.println("这个年级的课程是" + g.getSubject());
	}
}
